using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using WP.Modules;

namespace MaxLeaf
{
    public partial class frmPopup : BaseQryRpt 
    {
        public frmPopup()
        {
            InitializeComponent();
            linkMsg.Text = "";
        }

        private int miInitHt = 0;
        
        public void Popup( Point startPoint, string strMsg)
        {
            this.Location = startPoint;
            timer1.Enabled = true;
            miInitHt = this.Height;
            this.Height = 0;
            this.TopLevel = true;
            this.linkMsg.Text = strMsg;
            this.Show();
            this.Focus();
            this.timer1.Start();
        }
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (miInitHt <= this.Height)
            {
                timer1.Enabled = false;
                return;
            }
            this.Height += 10;
            this.Top -= 10;
        }

        private void frmPopup_MouseClick(object sender, MouseEventArgs e)
        {
            this.Close(); 
        }
    }
}